package com.study.java8;

public class CalculatorDemo {

    public static void main(String[] args) {



        engine((x,y) -> x + y);
        engine((x,y) -> x - y);
        engine((x,y) -> x * y);
        engine((x,y) -> x / y);


    }


    public static void engine(MyIntegerCalculator myIntegerCalculator){
        int x=2,y=3;
        int result= myIntegerCalculator.calcate(x,y);
        System.out.println(result);

    }

    interface  MyIntegerCalculator{
        int calcate(int x,int y);
    }




}

